#pragma once
#ifdef _WINDOWS  //64位系统没有预定义 WIN32
#ifdef __cplusplus
#define DLL_EXPORT_C_DECL extern "C" __declspec(dllexport)
#else
#define DLL_EXPORT_DECL __declspec(dllexport)
#endif
#else
#ifdef __cplusplus
#define DLL_EXPORT_C_DECL extern "C"
#else
#define DLL_EXPORT_DECL extern
#endif
#endif

#ifdef _WINDOWS
#define WIN32_LEAN_AND_MEAN             //  从 Windows 头文件中排除极少使用的信息
#include "stddef.h"
#ifdef WIN32
#define WINAPI      __cdecl
#include "../../SOPTv3.6.2_20210915/ThostFtdcTraderApi.h"
#pragma comment(lib, "../SOPTv3.6.2_20210915/soptthosttraderapi_se.lib")
#else
#define WINAPI      __stdcall
#include "../../SOPTv3.6.2_20210915/ThostFtdcTraderApi.h"
#pragma comment(lib, "../SOPTv3.6.2_20210915/soptthosttraderapi_se.lib")
#endif
#else
#define WINAPI
#include "../../SOPTv3.6.2_20210915/ThostFtdcTraderApi.h"
#endif
class Trade: ctp_sopt::CThostFtdcTraderSpi
{
public:
	// typedef
	typedef int (WINAPI *OnFrontConnectedType)();

typedef int (WINAPI *OnFrontDisconnectedType)(int nReason);

typedef int (WINAPI *OnHeartBeatWarningType)(int nTimeLapse);

typedef int (WINAPI *OnRspAuthenticateType)(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspUserLoginType)(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspUserLogoutType)(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspUserPasswordUpdateType)(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspTradingAccountPasswordUpdateType)(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspOrderInsertType)(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspParkedOrderInsertType)(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspParkedOrderActionType)(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspOrderActionType)(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQueryMaxOrderVolumeType)(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspSettlementInfoConfirmType)(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspRemoveParkedOrderType)(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspRemoveParkedOrderActionType)(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspExecOrderInsertType)(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspExecOrderActionType)(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspForQuoteInsertType)(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQuoteInsertType)(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQuoteActionType)(CThostFtdcInputQuoteActionField *pInputQuoteAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspLockInsertType)(CThostFtdcInputLockField *pInputLock, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspBatchOrderActionType)(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspCombActionInsertType)(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryOrderType)(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryTradeType)(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryInvestorPositionType)(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryTradingAccountType)(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryInvestorType)(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryTradingCodeType)(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryInstrumentMarginRateType)(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryInstrumentCommissionRateType)(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryExchangeType)(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryProductType)(CThostFtdcProductField *pProduct, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryInstrumentType)(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryDepthMarketDataType)(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQrySettlementInfoType)(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryTransferBankType)(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryInvestorPositionDetailType)(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryNoticeType)(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQrySettlementInfoConfirmType)(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryInvestorPositionCombineDetailType)(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryCFMMCTradingAccountKeyType)(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryEWarrantOffsetType)(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryInvestorProductGroupMarginType)(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryExchangeMarginRateType)(CThostFtdcExchangeMarginRateField *pExchangeMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryExchangeMarginRateAdjustType)(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryExchangeRateType)(CThostFtdcExchangeRateField *pExchangeRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQrySecAgentACIDMapType)(CThostFtdcSecAgentACIDMapField *pSecAgentACIDMap, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryProductExchRateType)(CThostFtdcProductExchRateField *pProductExchRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryProductGroupType)(CThostFtdcProductGroupField *pProductGroup, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryMMInstrumentCommissionRateType)(CThostFtdcMMInstrumentCommissionRateField *pMMInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryMMOptionInstrCommRateType)(CThostFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryInstrumentOrderCommRateType)(CThostFtdcInstrumentOrderCommRateField *pInstrumentOrderCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryOptionInstrTradeCostType)(CThostFtdcOptionInstrTradeCostField *pOptionInstrTradeCost, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryOptionInstrCommRateType)(CThostFtdcOptionInstrCommRateField *pOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryExecOrderType)(CThostFtdcExecOrderField *pExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryForQuoteType)(CThostFtdcForQuoteField *pForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryQuoteType)(CThostFtdcQuoteField *pQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryLockType)(CThostFtdcLockField *pLock, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryLockPositionType)(CThostFtdcLockPositionField *pLockPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryETFOptionInstrCommRateType)(CThostFtdcETFOptionInstrCommRateField *pETFOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryLimitPosiType)(CThostFtdcLimitPosiField *pLimitPosi, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryInvestorLevelType)(CThostFtdcInvestorLevelField *pInvestorLevel, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryExecFreezeType)(CThostFtdcExecFreezeField *pExecFreeze, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryLimitAmountType)(CThostFtdcLimitAmountField *pLimitAmount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryCombInstrumentGuardType)(CThostFtdcCombInstrumentGuardField *pCombInstrumentGuard, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryCombActionType)(CThostFtdcCombActionField *pCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryTransferSerialType)(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryAccountregisterType)(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspErrorType)(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRtnOrderType)(CThostFtdcOrderField *pOrder);

typedef int (WINAPI *OnRtnTradeType)(CThostFtdcTradeField *pTrade);

typedef int (WINAPI *OnErrRtnOrderInsertType)(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnErrRtnOrderActionType)(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnRtnInstrumentStatusType)(CThostFtdcInstrumentStatusField *pInstrumentStatus);

typedef int (WINAPI *OnRtnBulletinType)(CThostFtdcBulletinField *pBulletin);

typedef int (WINAPI *OnRtnTradingNoticeType)(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo);

typedef int (WINAPI *OnRtnErrorConditionalOrderType)(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder);

typedef int (WINAPI *OnRtnExecOrderType)(CThostFtdcExecOrderField *pExecOrder);

typedef int (WINAPI *OnErrRtnExecOrderInsertType)(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnErrRtnExecOrderActionType)(CThostFtdcExecOrderActionField *pExecOrderAction, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnErrRtnForQuoteInsertType)(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnRtnQuoteType)(CThostFtdcQuoteField *pQuote);

typedef int (WINAPI *OnErrRtnQuoteInsertType)(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnErrRtnQuoteActionType)(CThostFtdcQuoteActionField *pQuoteAction, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnRtnForQuoteRspType)(CThostFtdcForQuoteRspField *pForQuoteRsp);

typedef int (WINAPI *OnRtnCFMMCTradingAccountTokenType)(CThostFtdcCFMMCTradingAccountTokenField *pCFMMCTradingAccountToken);

typedef int (WINAPI *OnRtnLockType)(CThostFtdcLockField *pLock);

typedef int (WINAPI *OnErrRtnLockInsertType)(CThostFtdcInputLockField *pInputLock, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnErrRtnBatchOrderActionType)(CThostFtdcBatchOrderActionField *pBatchOrderAction, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnRtnCombActionType)(CThostFtdcCombActionField *pCombAction);

typedef int (WINAPI *OnErrRtnCombActionInsertType)(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnRspQryContractBankType)(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryParkedOrderType)(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryParkedOrderActionType)(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryTradingNoticeType)(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryBrokerTradingParamsType)(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryBrokerTradingAlgosType)(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQueryCFMMCTradingAccountTokenType)(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRtnFromBankToFutureByBankType)(CThostFtdcRspTransferField *pRspTransfer);

typedef int (WINAPI *OnRtnFromFutureToBankByBankType)(CThostFtdcRspTransferField *pRspTransfer);

typedef int (WINAPI *OnRtnRepealFromBankToFutureByBankType)(CThostFtdcRspRepealField *pRspRepeal);

typedef int (WINAPI *OnRtnRepealFromFutureToBankByBankType)(CThostFtdcRspRepealField *pRspRepeal);

typedef int (WINAPI *OnRtnFromBankToFutureByFutureType)(CThostFtdcRspTransferField *pRspTransfer);

typedef int (WINAPI *OnRtnFromFutureToBankByFutureType)(CThostFtdcRspTransferField *pRspTransfer);

typedef int (WINAPI *OnRtnRepealFromBankToFutureByFutureManualType)(CThostFtdcRspRepealField *pRspRepeal);

typedef int (WINAPI *OnRtnRepealFromFutureToBankByFutureManualType)(CThostFtdcRspRepealField *pRspRepeal);

typedef int (WINAPI *OnRtnQueryBankBalanceByFutureType)(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount);

typedef int (WINAPI *OnErrRtnBankToFutureByFutureType)(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnErrRtnFutureToBankByFutureType)(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnErrRtnRepealBankToFutureByFutureManualType)(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnErrRtnRepealFutureToBankByFutureManualType)(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnErrRtnQueryBankBalanceByFutureType)(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnRtnRepealFromBankToFutureByFutureType)(CThostFtdcRspRepealField *pRspRepeal);

typedef int (WINAPI *OnRtnRepealFromFutureToBankByFutureType)(CThostFtdcRspRepealField *pRspRepeal);

typedef int (WINAPI *OnRspFromBankToFutureByFutureType)(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspFromFutureToBankByFutureType)(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQueryBankAccountMoneyByFutureType)(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRtnOpenAccountByBankType)(CThostFtdcOpenAccountField *pOpenAccount);

typedef int (WINAPI *OnRtnCancelAccountByBankType)(CThostFtdcCancelAccountField *pCancelAccount);

typedef int (WINAPI *OnRtnChangeAccountByBankType)(CThostFtdcChangeAccountField *pChangeAccount);

typedef int (WINAPI *OnRtnResOpenAccConfirmTpdByBankType)(CThostFtdcResOpenAccConfirmTpdField *pResOpenAccConfirmTpd);

typedef int (WINAPI *OnRspReserveOpenAccountTpdByFutureType)(CThostFtdcReqReserveOpenAccountTpdField *pReqReserveOpenAccountTpd, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspSecuritiesDepositInterestByFutureType)(CThostFtdcReqSecuritiesDepositInterestField *pReqSecuritiesDepositInterest, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspDayEndFileReadyByFutureType)(CThostFtdcReqDayEndFileReadyField *pReqDayEndFileReady, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspExecCombineOrderInsertType)(CThostFtdcInputExecCombineOrderField *pInputExecCombineOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspExecCombineOrderActionType)(CThostFtdcInputExecCombineOrderActionField *pInputExecCombineOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryExecCombineOrderType)(CThostFtdcExecCombineOrderField *pExecCombineOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnErrRtnExecCombineOrderActionType)(CThostFtdcExecCombineOrderActionField *pExecCombineOrderAction, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnErrRtnExecCombineOrderInsertType)(CThostFtdcInputExecCombineOrderField *pInputExecCombineOrder, CThostFtdcRspInfoField *pRspInfo);

typedef int (WINAPI *OnRtnExecCombineOrderType)(CThostFtdcExecCombineOrderField *pExecCombineOrder);

typedef int (WINAPI *OnRspInternalTransferType)(CThostFtdcInputInternalTransferField *pInputInternalTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRtnInternalTransferType)(CThostFtdcRtnInternalTransferField *pRtnInternalTransfer);

typedef int (WINAPI *OnRspQryInternalTransferType)(CThostFtdcInternalTransferField *pInternalTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);

typedef int (WINAPI *OnRspQryFutureTradingAccountType)(CThostFtdcNtfQryFutureTradingAccountField *pNtfQryFutureTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);


	// vars
	void *_OnFrontConnected;

void *_OnFrontDisconnected;

void *_OnHeartBeatWarning;

void *_OnRspAuthenticate;

void *_OnRspUserLogin;

void *_OnRspUserLogout;

void *_OnRspUserPasswordUpdate;

void *_OnRspTradingAccountPasswordUpdate;

void *_OnRspOrderInsert;

void *_OnRspParkedOrderInsert;

void *_OnRspParkedOrderAction;

void *_OnRspOrderAction;

void *_OnRspQueryMaxOrderVolume;

void *_OnRspSettlementInfoConfirm;

void *_OnRspRemoveParkedOrder;

void *_OnRspRemoveParkedOrderAction;

void *_OnRspExecOrderInsert;

void *_OnRspExecOrderAction;

void *_OnRspForQuoteInsert;

void *_OnRspQuoteInsert;

void *_OnRspQuoteAction;

void *_OnRspLockInsert;

void *_OnRspBatchOrderAction;

void *_OnRspCombActionInsert;

void *_OnRspQryOrder;

void *_OnRspQryTrade;

void *_OnRspQryInvestorPosition;

void *_OnRspQryTradingAccount;

void *_OnRspQryInvestor;

void *_OnRspQryTradingCode;

void *_OnRspQryInstrumentMarginRate;

void *_OnRspQryInstrumentCommissionRate;

void *_OnRspQryExchange;

void *_OnRspQryProduct;

void *_OnRspQryInstrument;

void *_OnRspQryDepthMarketData;

void *_OnRspQrySettlementInfo;

void *_OnRspQryTransferBank;

void *_OnRspQryInvestorPositionDetail;

void *_OnRspQryNotice;

void *_OnRspQrySettlementInfoConfirm;

void *_OnRspQryInvestorPositionCombineDetail;

void *_OnRspQryCFMMCTradingAccountKey;

void *_OnRspQryEWarrantOffset;

void *_OnRspQryInvestorProductGroupMargin;

void *_OnRspQryExchangeMarginRate;

void *_OnRspQryExchangeMarginRateAdjust;

void *_OnRspQryExchangeRate;

void *_OnRspQrySecAgentACIDMap;

void *_OnRspQryProductExchRate;

void *_OnRspQryProductGroup;

void *_OnRspQryMMInstrumentCommissionRate;

void *_OnRspQryMMOptionInstrCommRate;

void *_OnRspQryInstrumentOrderCommRate;

void *_OnRspQryOptionInstrTradeCost;

void *_OnRspQryOptionInstrCommRate;

void *_OnRspQryExecOrder;

void *_OnRspQryForQuote;

void *_OnRspQryQuote;

void *_OnRspQryLock;

void *_OnRspQryLockPosition;

void *_OnRspQryETFOptionInstrCommRate;

void *_OnRspQryLimitPosi;

void *_OnRspQryInvestorLevel;

void *_OnRspQryExecFreeze;

void *_OnRspQryLimitAmount;

void *_OnRspQryCombInstrumentGuard;

void *_OnRspQryCombAction;

void *_OnRspQryTransferSerial;

void *_OnRspQryAccountregister;

void *_OnRspError;

void *_OnRtnOrder;

void *_OnRtnTrade;

void *_OnErrRtnOrderInsert;

void *_OnErrRtnOrderAction;

void *_OnRtnInstrumentStatus;

void *_OnRtnBulletin;

void *_OnRtnTradingNotice;

void *_OnRtnErrorConditionalOrder;

void *_OnRtnExecOrder;

void *_OnErrRtnExecOrderInsert;

void *_OnErrRtnExecOrderAction;

void *_OnErrRtnForQuoteInsert;

void *_OnRtnQuote;

void *_OnErrRtnQuoteInsert;

void *_OnErrRtnQuoteAction;

void *_OnRtnForQuoteRsp;

void *_OnRtnCFMMCTradingAccountToken;

void *_OnRtnLock;

void *_OnErrRtnLockInsert;

void *_OnErrRtnBatchOrderAction;

void *_OnRtnCombAction;

void *_OnErrRtnCombActionInsert;

void *_OnRspQryContractBank;

void *_OnRspQryParkedOrder;

void *_OnRspQryParkedOrderAction;

void *_OnRspQryTradingNotice;

void *_OnRspQryBrokerTradingParams;

void *_OnRspQryBrokerTradingAlgos;

void *_OnRspQueryCFMMCTradingAccountToken;

void *_OnRtnFromBankToFutureByBank;

void *_OnRtnFromFutureToBankByBank;

void *_OnRtnRepealFromBankToFutureByBank;

void *_OnRtnRepealFromFutureToBankByBank;

void *_OnRtnFromBankToFutureByFuture;

void *_OnRtnFromFutureToBankByFuture;

void *_OnRtnRepealFromBankToFutureByFutureManual;

void *_OnRtnRepealFromFutureToBankByFutureManual;

void *_OnRtnQueryBankBalanceByFuture;

void *_OnErrRtnBankToFutureByFuture;

void *_OnErrRtnFutureToBankByFuture;

void *_OnErrRtnRepealBankToFutureByFutureManual;

void *_OnErrRtnRepealFutureToBankByFutureManual;

void *_OnErrRtnQueryBankBalanceByFuture;

void *_OnRtnRepealFromBankToFutureByFuture;

void *_OnRtnRepealFromFutureToBankByFuture;

void *_OnRspFromBankToFutureByFuture;

void *_OnRspFromFutureToBankByFuture;

void *_OnRspQueryBankAccountMoneyByFuture;

void *_OnRtnOpenAccountByBank;

void *_OnRtnCancelAccountByBank;

void *_OnRtnChangeAccountByBank;

void *_OnRtnResOpenAccConfirmTpdByBank;

void *_OnRspReserveOpenAccountTpdByFuture;

void *_OnRspSecuritiesDepositInterestByFuture;

void *_OnRspDayEndFileReadyByFuture;

void *_OnRspExecCombineOrderInsert;

void *_OnRspExecCombineOrderAction;

void *_OnRspQryExecCombineOrder;

void *_OnErrRtnExecCombineOrderAction;

void *_OnErrRtnExecCombineOrderInsert;

void *_OnRtnExecCombineOrder;

void *_OnRspInternalTransfer;

void *_OnRtnInternalTransfer;

void *_OnRspQryInternalTransfer;

void *_OnRspQryFutureTradingAccount;


	// funcs
	virtual void OnFrontConnected()
	{
		if (_OnFrontConnected)
		{
		
				((OnFrontConnectedType)_OnFrontConnected)();
		
		}
	}
virtual void OnFrontDisconnected(int nReason)
	{
		if (_OnFrontDisconnected)
		{
		
			
			((OnFrontDisconnectedType)_OnFrontDisconnected)(nReason);
			
		
		}
	}
virtual void OnHeartBeatWarning(int nTimeLapse)
	{
		if (_OnHeartBeatWarning)
		{
		
			
			((OnHeartBeatWarningType)_OnHeartBeatWarning)(nTimeLapse);
			
		
		}
	}
virtual void OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspAuthenticate)
		{
		
			
			((OnRspAuthenticateType)_OnRspAuthenticate)(pRspAuthenticateField,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspUserLogin)
		{
		
			
			((OnRspUserLoginType)_OnRspUserLogin)(pRspUserLogin,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspUserLogout)
		{
		
			
			((OnRspUserLogoutType)_OnRspUserLogout)(pUserLogout,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspUserPasswordUpdate)
		{
		
			
			((OnRspUserPasswordUpdateType)_OnRspUserPasswordUpdate)(pUserPasswordUpdate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspTradingAccountPasswordUpdate)
		{
		
			
			((OnRspTradingAccountPasswordUpdateType)_OnRspTradingAccountPasswordUpdate)(pTradingAccountPasswordUpdate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspOrderInsert)
		{
		
			
			((OnRspOrderInsertType)_OnRspOrderInsert)(pInputOrder,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspParkedOrderInsert)
		{
		
			
			((OnRspParkedOrderInsertType)_OnRspParkedOrderInsert)(pParkedOrder,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspParkedOrderAction)
		{
		
			
			((OnRspParkedOrderActionType)_OnRspParkedOrderAction)(pParkedOrderAction,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspOrderAction)
		{
		
			
			((OnRspOrderActionType)_OnRspOrderAction)(pInputOrderAction,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQueryMaxOrderVolume)
		{
		
			
			((OnRspQueryMaxOrderVolumeType)_OnRspQueryMaxOrderVolume)(pQueryMaxOrderVolume,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspSettlementInfoConfirm)
		{
		
			
			((OnRspSettlementInfoConfirmType)_OnRspSettlementInfoConfirm)(pSettlementInfoConfirm,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspRemoveParkedOrder)
		{
		
			
			((OnRspRemoveParkedOrderType)_OnRspRemoveParkedOrder)(pRemoveParkedOrder,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspRemoveParkedOrderAction)
		{
		
			
			((OnRspRemoveParkedOrderActionType)_OnRspRemoveParkedOrderAction)(pRemoveParkedOrderAction,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspExecOrderInsert)
		{
		
			
			((OnRspExecOrderInsertType)_OnRspExecOrderInsert)(pInputExecOrder,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspExecOrderAction)
		{
		
			
			((OnRspExecOrderActionType)_OnRspExecOrderAction)(pInputExecOrderAction,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspForQuoteInsert)
		{
		
			
			((OnRspForQuoteInsertType)_OnRspForQuoteInsert)(pInputForQuote,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQuoteInsert)
		{
		
			
			((OnRspQuoteInsertType)_OnRspQuoteInsert)(pInputQuote,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQuoteAction)
		{
		
			
			((OnRspQuoteActionType)_OnRspQuoteAction)(pInputQuoteAction,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspLockInsert(CThostFtdcInputLockField *pInputLock, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspLockInsert)
		{
		
			
			((OnRspLockInsertType)_OnRspLockInsert)(pInputLock,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspBatchOrderAction)
		{
		
			
			((OnRspBatchOrderActionType)_OnRspBatchOrderAction)(pInputBatchOrderAction,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspCombActionInsert)
		{
		
			
			((OnRspCombActionInsertType)_OnRspCombActionInsert)(pInputCombAction,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryOrder)
		{
		
			
			((OnRspQryOrderType)_OnRspQryOrder)(pOrder,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryTrade)
		{
		
			
			((OnRspQryTradeType)_OnRspQryTrade)(pTrade,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInvestorPosition)
		{
		
			
			((OnRspQryInvestorPositionType)_OnRspQryInvestorPosition)(pInvestorPosition,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryTradingAccount)
		{
		
			
			((OnRspQryTradingAccountType)_OnRspQryTradingAccount)(pTradingAccount,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryInvestor(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInvestor)
		{
		
			
			((OnRspQryInvestorType)_OnRspQryInvestor)(pInvestor,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryTradingCode(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryTradingCode)
		{
		
			
			((OnRspQryTradingCodeType)_OnRspQryTradingCode)(pTradingCode,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInstrumentMarginRate)
		{
		
			
			((OnRspQryInstrumentMarginRateType)_OnRspQryInstrumentMarginRate)(pInstrumentMarginRate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInstrumentCommissionRate)
		{
		
			
			((OnRspQryInstrumentCommissionRateType)_OnRspQryInstrumentCommissionRate)(pInstrumentCommissionRate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryExchange)
		{
		
			
			((OnRspQryExchangeType)_OnRspQryExchange)(pExchange,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryProduct(CThostFtdcProductField *pProduct, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryProduct)
		{
		
			
			((OnRspQryProductType)_OnRspQryProduct)(pProduct,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInstrument)
		{
		
			
			((OnRspQryInstrumentType)_OnRspQryInstrument)(pInstrument,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryDepthMarketData)
		{
		
			
			((OnRspQryDepthMarketDataType)_OnRspQryDepthMarketData)(pDepthMarketData,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQrySettlementInfo)
		{
		
			
			((OnRspQrySettlementInfoType)_OnRspQrySettlementInfo)(pSettlementInfo,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryTransferBank(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryTransferBank)
		{
		
			
			((OnRspQryTransferBankType)_OnRspQryTransferBank)(pTransferBank,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInvestorPositionDetail)
		{
		
			
			((OnRspQryInvestorPositionDetailType)_OnRspQryInvestorPositionDetail)(pInvestorPositionDetail,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryNotice(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryNotice)
		{
		
			
			((OnRspQryNoticeType)_OnRspQryNotice)(pNotice,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQrySettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQrySettlementInfoConfirm)
		{
		
			
			((OnRspQrySettlementInfoConfirmType)_OnRspQrySettlementInfoConfirm)(pSettlementInfoConfirm,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryInvestorPositionCombineDetail(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInvestorPositionCombineDetail)
		{
		
			
			((OnRspQryInvestorPositionCombineDetailType)_OnRspQryInvestorPositionCombineDetail)(pInvestorPositionCombineDetail,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryCFMMCTradingAccountKey(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryCFMMCTradingAccountKey)
		{
		
			
			((OnRspQryCFMMCTradingAccountKeyType)_OnRspQryCFMMCTradingAccountKey)(pCFMMCTradingAccountKey,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryEWarrantOffset(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryEWarrantOffset)
		{
		
			
			((OnRspQryEWarrantOffsetType)_OnRspQryEWarrantOffset)(pEWarrantOffset,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryInvestorProductGroupMargin(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInvestorProductGroupMargin)
		{
		
			
			((OnRspQryInvestorProductGroupMarginType)_OnRspQryInvestorProductGroupMargin)(pInvestorProductGroupMargin,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryExchangeMarginRate(CThostFtdcExchangeMarginRateField *pExchangeMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryExchangeMarginRate)
		{
		
			
			((OnRspQryExchangeMarginRateType)_OnRspQryExchangeMarginRate)(pExchangeMarginRate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryExchangeMarginRateAdjust(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryExchangeMarginRateAdjust)
		{
		
			
			((OnRspQryExchangeMarginRateAdjustType)_OnRspQryExchangeMarginRateAdjust)(pExchangeMarginRateAdjust,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryExchangeRate(CThostFtdcExchangeRateField *pExchangeRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryExchangeRate)
		{
		
			
			((OnRspQryExchangeRateType)_OnRspQryExchangeRate)(pExchangeRate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQrySecAgentACIDMap(CThostFtdcSecAgentACIDMapField *pSecAgentACIDMap, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQrySecAgentACIDMap)
		{
		
			
			((OnRspQrySecAgentACIDMapType)_OnRspQrySecAgentACIDMap)(pSecAgentACIDMap,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryProductExchRate(CThostFtdcProductExchRateField *pProductExchRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryProductExchRate)
		{
		
			
			((OnRspQryProductExchRateType)_OnRspQryProductExchRate)(pProductExchRate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryProductGroup(CThostFtdcProductGroupField *pProductGroup, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryProductGroup)
		{
		
			
			((OnRspQryProductGroupType)_OnRspQryProductGroup)(pProductGroup,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryMMInstrumentCommissionRate(CThostFtdcMMInstrumentCommissionRateField *pMMInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryMMInstrumentCommissionRate)
		{
		
			
			((OnRspQryMMInstrumentCommissionRateType)_OnRspQryMMInstrumentCommissionRate)(pMMInstrumentCommissionRate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryMMOptionInstrCommRate(CThostFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryMMOptionInstrCommRate)
		{
		
			
			((OnRspQryMMOptionInstrCommRateType)_OnRspQryMMOptionInstrCommRate)(pMMOptionInstrCommRate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryInstrumentOrderCommRate(CThostFtdcInstrumentOrderCommRateField *pInstrumentOrderCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInstrumentOrderCommRate)
		{
		
			
			((OnRspQryInstrumentOrderCommRateType)_OnRspQryInstrumentOrderCommRate)(pInstrumentOrderCommRate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryOptionInstrTradeCost(CThostFtdcOptionInstrTradeCostField *pOptionInstrTradeCost, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryOptionInstrTradeCost)
		{
		
			
			((OnRspQryOptionInstrTradeCostType)_OnRspQryOptionInstrTradeCost)(pOptionInstrTradeCost,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryOptionInstrCommRate(CThostFtdcOptionInstrCommRateField *pOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryOptionInstrCommRate)
		{
		
			
			((OnRspQryOptionInstrCommRateType)_OnRspQryOptionInstrCommRate)(pOptionInstrCommRate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryExecOrder(CThostFtdcExecOrderField *pExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryExecOrder)
		{
		
			
			((OnRspQryExecOrderType)_OnRspQryExecOrder)(pExecOrder,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryForQuote(CThostFtdcForQuoteField *pForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryForQuote)
		{
		
			
			((OnRspQryForQuoteType)_OnRspQryForQuote)(pForQuote,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryQuote(CThostFtdcQuoteField *pQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryQuote)
		{
		
			
			((OnRspQryQuoteType)_OnRspQryQuote)(pQuote,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryLock(CThostFtdcLockField *pLock, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryLock)
		{
		
			
			((OnRspQryLockType)_OnRspQryLock)(pLock,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryLockPosition(CThostFtdcLockPositionField *pLockPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryLockPosition)
		{
		
			
			((OnRspQryLockPositionType)_OnRspQryLockPosition)(pLockPosition,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryETFOptionInstrCommRate(CThostFtdcETFOptionInstrCommRateField *pETFOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryETFOptionInstrCommRate)
		{
		
			
			((OnRspQryETFOptionInstrCommRateType)_OnRspQryETFOptionInstrCommRate)(pETFOptionInstrCommRate,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryLimitPosi(CThostFtdcLimitPosiField *pLimitPosi, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryLimitPosi)
		{
		
			
			((OnRspQryLimitPosiType)_OnRspQryLimitPosi)(pLimitPosi,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryInvestorLevel(CThostFtdcInvestorLevelField *pInvestorLevel, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInvestorLevel)
		{
		
			
			((OnRspQryInvestorLevelType)_OnRspQryInvestorLevel)(pInvestorLevel,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryExecFreeze(CThostFtdcExecFreezeField *pExecFreeze, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryExecFreeze)
		{
		
			
			((OnRspQryExecFreezeType)_OnRspQryExecFreeze)(pExecFreeze,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryLimitAmount(CThostFtdcLimitAmountField *pLimitAmount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryLimitAmount)
		{
		
			
			((OnRspQryLimitAmountType)_OnRspQryLimitAmount)(pLimitAmount,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryCombInstrumentGuard(CThostFtdcCombInstrumentGuardField *pCombInstrumentGuard, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryCombInstrumentGuard)
		{
		
			
			((OnRspQryCombInstrumentGuardType)_OnRspQryCombInstrumentGuard)(pCombInstrumentGuard,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryCombAction(CThostFtdcCombActionField *pCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryCombAction)
		{
		
			
			((OnRspQryCombActionType)_OnRspQryCombAction)(pCombAction,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryTransferSerial(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryTransferSerial)
		{
		
			
			((OnRspQryTransferSerialType)_OnRspQryTransferSerial)(pTransferSerial,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryAccountregister(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryAccountregister)
		{
		
			
			((OnRspQryAccountregisterType)_OnRspQryAccountregister)(pAccountregister,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspError)
		{
		
			
			((OnRspErrorType)_OnRspError)(pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRtnOrder(CThostFtdcOrderField *pOrder)
	{
		if (_OnRtnOrder)
		{
		
			
			((OnRtnOrderType)_OnRtnOrder)(pOrder);
			
		
		}
	}
virtual void OnRtnTrade(CThostFtdcTradeField *pTrade)
	{
		if (_OnRtnTrade)
		{
		
			
			((OnRtnTradeType)_OnRtnTrade)(pTrade);
			
		
		}
	}
virtual void OnErrRtnOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnOrderInsert)
		{
		
			
			((OnErrRtnOrderInsertType)_OnErrRtnOrderInsert)(pInputOrder,pRspInfo);
			
		
		}
	}
virtual void OnErrRtnOrderAction(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnOrderAction)
		{
		
			
			((OnErrRtnOrderActionType)_OnErrRtnOrderAction)(pOrderAction,pRspInfo);
			
		
		}
	}
virtual void OnRtnInstrumentStatus(CThostFtdcInstrumentStatusField *pInstrumentStatus)
	{
		if (_OnRtnInstrumentStatus)
		{
		
			
			((OnRtnInstrumentStatusType)_OnRtnInstrumentStatus)(pInstrumentStatus);
			
		
		}
	}
virtual void OnRtnBulletin(CThostFtdcBulletinField *pBulletin)
	{
		if (_OnRtnBulletin)
		{
		
			
			((OnRtnBulletinType)_OnRtnBulletin)(pBulletin);
			
		
		}
	}
virtual void OnRtnTradingNotice(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo)
	{
		if (_OnRtnTradingNotice)
		{
		
			
			((OnRtnTradingNoticeType)_OnRtnTradingNotice)(pTradingNoticeInfo);
			
		
		}
	}
virtual void OnRtnErrorConditionalOrder(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder)
	{
		if (_OnRtnErrorConditionalOrder)
		{
		
			
			((OnRtnErrorConditionalOrderType)_OnRtnErrorConditionalOrder)(pErrorConditionalOrder);
			
		
		}
	}
virtual void OnRtnExecOrder(CThostFtdcExecOrderField *pExecOrder)
	{
		if (_OnRtnExecOrder)
		{
		
			
			((OnRtnExecOrderType)_OnRtnExecOrder)(pExecOrder);
			
		
		}
	}
virtual void OnErrRtnExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnExecOrderInsert)
		{
		
			
			((OnErrRtnExecOrderInsertType)_OnErrRtnExecOrderInsert)(pInputExecOrder,pRspInfo);
			
		
		}
	}
virtual void OnErrRtnExecOrderAction(CThostFtdcExecOrderActionField *pExecOrderAction, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnExecOrderAction)
		{
		
			
			((OnErrRtnExecOrderActionType)_OnErrRtnExecOrderAction)(pExecOrderAction,pRspInfo);
			
		
		}
	}
virtual void OnErrRtnForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnForQuoteInsert)
		{
		
			
			((OnErrRtnForQuoteInsertType)_OnErrRtnForQuoteInsert)(pInputForQuote,pRspInfo);
			
		
		}
	}
virtual void OnRtnQuote(CThostFtdcQuoteField *pQuote)
	{
		if (_OnRtnQuote)
		{
		
			
			((OnRtnQuoteType)_OnRtnQuote)(pQuote);
			
		
		}
	}
virtual void OnErrRtnQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnQuoteInsert)
		{
		
			
			((OnErrRtnQuoteInsertType)_OnErrRtnQuoteInsert)(pInputQuote,pRspInfo);
			
		
		}
	}
virtual void OnErrRtnQuoteAction(CThostFtdcQuoteActionField *pQuoteAction, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnQuoteAction)
		{
		
			
			((OnErrRtnQuoteActionType)_OnErrRtnQuoteAction)(pQuoteAction,pRspInfo);
			
		
		}
	}
virtual void OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp)
	{
		if (_OnRtnForQuoteRsp)
		{
		
			
			((OnRtnForQuoteRspType)_OnRtnForQuoteRsp)(pForQuoteRsp);
			
		
		}
	}
virtual void OnRtnCFMMCTradingAccountToken(CThostFtdcCFMMCTradingAccountTokenField *pCFMMCTradingAccountToken)
	{
		if (_OnRtnCFMMCTradingAccountToken)
		{
		
			
			((OnRtnCFMMCTradingAccountTokenType)_OnRtnCFMMCTradingAccountToken)(pCFMMCTradingAccountToken);
			
		
		}
	}
virtual void OnRtnLock(CThostFtdcLockField *pLock)
	{
		if (_OnRtnLock)
		{
		
			
			((OnRtnLockType)_OnRtnLock)(pLock);
			
		
		}
	}
virtual void OnErrRtnLockInsert(CThostFtdcInputLockField *pInputLock, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnLockInsert)
		{
		
			
			((OnErrRtnLockInsertType)_OnErrRtnLockInsert)(pInputLock,pRspInfo);
			
		
		}
	}
virtual void OnErrRtnBatchOrderAction(CThostFtdcBatchOrderActionField *pBatchOrderAction, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnBatchOrderAction)
		{
		
			
			((OnErrRtnBatchOrderActionType)_OnErrRtnBatchOrderAction)(pBatchOrderAction,pRspInfo);
			
		
		}
	}
virtual void OnRtnCombAction(CThostFtdcCombActionField *pCombAction)
	{
		if (_OnRtnCombAction)
		{
		
			
			((OnRtnCombActionType)_OnRtnCombAction)(pCombAction);
			
		
		}
	}
virtual void OnErrRtnCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnCombActionInsert)
		{
		
			
			((OnErrRtnCombActionInsertType)_OnErrRtnCombActionInsert)(pInputCombAction,pRspInfo);
			
		
		}
	}
virtual void OnRspQryContractBank(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryContractBank)
		{
		
			
			((OnRspQryContractBankType)_OnRspQryContractBank)(pContractBank,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryParkedOrder(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryParkedOrder)
		{
		
			
			((OnRspQryParkedOrderType)_OnRspQryParkedOrder)(pParkedOrder,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryParkedOrderAction)
		{
		
			
			((OnRspQryParkedOrderActionType)_OnRspQryParkedOrderAction)(pParkedOrderAction,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryTradingNotice)
		{
		
			
			((OnRspQryTradingNoticeType)_OnRspQryTradingNotice)(pTradingNotice,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryBrokerTradingParams)
		{
		
			
			((OnRspQryBrokerTradingParamsType)_OnRspQryBrokerTradingParams)(pBrokerTradingParams,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryBrokerTradingAlgos)
		{
		
			
			((OnRspQryBrokerTradingAlgosType)_OnRspQryBrokerTradingAlgos)(pBrokerTradingAlgos,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQueryCFMMCTradingAccountToken)
		{
		
			
			((OnRspQueryCFMMCTradingAccountTokenType)_OnRspQueryCFMMCTradingAccountToken)(pQueryCFMMCTradingAccountToken,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRtnFromBankToFutureByBank(CThostFtdcRspTransferField *pRspTransfer)
	{
		if (_OnRtnFromBankToFutureByBank)
		{
		
			
			((OnRtnFromBankToFutureByBankType)_OnRtnFromBankToFutureByBank)(pRspTransfer);
			
		
		}
	}
virtual void OnRtnFromFutureToBankByBank(CThostFtdcRspTransferField *pRspTransfer)
	{
		if (_OnRtnFromFutureToBankByBank)
		{
		
			
			((OnRtnFromFutureToBankByBankType)_OnRtnFromFutureToBankByBank)(pRspTransfer);
			
		
		}
	}
virtual void OnRtnRepealFromBankToFutureByBank(CThostFtdcRspRepealField *pRspRepeal)
	{
		if (_OnRtnRepealFromBankToFutureByBank)
		{
		
			
			((OnRtnRepealFromBankToFutureByBankType)_OnRtnRepealFromBankToFutureByBank)(pRspRepeal);
			
		
		}
	}
virtual void OnRtnRepealFromFutureToBankByBank(CThostFtdcRspRepealField *pRspRepeal)
	{
		if (_OnRtnRepealFromFutureToBankByBank)
		{
		
			
			((OnRtnRepealFromFutureToBankByBankType)_OnRtnRepealFromFutureToBankByBank)(pRspRepeal);
			
		
		}
	}
virtual void OnRtnFromBankToFutureByFuture(CThostFtdcRspTransferField *pRspTransfer)
	{
		if (_OnRtnFromBankToFutureByFuture)
		{
		
			
			((OnRtnFromBankToFutureByFutureType)_OnRtnFromBankToFutureByFuture)(pRspTransfer);
			
		
		}
	}
virtual void OnRtnFromFutureToBankByFuture(CThostFtdcRspTransferField *pRspTransfer)
	{
		if (_OnRtnFromFutureToBankByFuture)
		{
		
			
			((OnRtnFromFutureToBankByFutureType)_OnRtnFromFutureToBankByFuture)(pRspTransfer);
			
		
		}
	}
virtual void OnRtnRepealFromBankToFutureByFutureManual(CThostFtdcRspRepealField *pRspRepeal)
	{
		if (_OnRtnRepealFromBankToFutureByFutureManual)
		{
		
			
			((OnRtnRepealFromBankToFutureByFutureManualType)_OnRtnRepealFromBankToFutureByFutureManual)(pRspRepeal);
			
		
		}
	}
virtual void OnRtnRepealFromFutureToBankByFutureManual(CThostFtdcRspRepealField *pRspRepeal)
	{
		if (_OnRtnRepealFromFutureToBankByFutureManual)
		{
		
			
			((OnRtnRepealFromFutureToBankByFutureManualType)_OnRtnRepealFromFutureToBankByFutureManual)(pRspRepeal);
			
		
		}
	}
virtual void OnRtnQueryBankBalanceByFuture(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount)
	{
		if (_OnRtnQueryBankBalanceByFuture)
		{
		
			
			((OnRtnQueryBankBalanceByFutureType)_OnRtnQueryBankBalanceByFuture)(pNotifyQueryAccount);
			
		
		}
	}
virtual void OnErrRtnBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnBankToFutureByFuture)
		{
		
			
			((OnErrRtnBankToFutureByFutureType)_OnErrRtnBankToFutureByFuture)(pReqTransfer,pRspInfo);
			
		
		}
	}
virtual void OnErrRtnFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnFutureToBankByFuture)
		{
		
			
			((OnErrRtnFutureToBankByFutureType)_OnErrRtnFutureToBankByFuture)(pReqTransfer,pRspInfo);
			
		
		}
	}
virtual void OnErrRtnRepealBankToFutureByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnRepealBankToFutureByFutureManual)
		{
		
			
			((OnErrRtnRepealBankToFutureByFutureManualType)_OnErrRtnRepealBankToFutureByFutureManual)(pReqRepeal,pRspInfo);
			
		
		}
	}
virtual void OnErrRtnRepealFutureToBankByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnRepealFutureToBankByFutureManual)
		{
		
			
			((OnErrRtnRepealFutureToBankByFutureManualType)_OnErrRtnRepealFutureToBankByFutureManual)(pReqRepeal,pRspInfo);
			
		
		}
	}
virtual void OnErrRtnQueryBankBalanceByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnQueryBankBalanceByFuture)
		{
		
			
			((OnErrRtnQueryBankBalanceByFutureType)_OnErrRtnQueryBankBalanceByFuture)(pReqQueryAccount,pRspInfo);
			
		
		}
	}
virtual void OnRtnRepealFromBankToFutureByFuture(CThostFtdcRspRepealField *pRspRepeal)
	{
		if (_OnRtnRepealFromBankToFutureByFuture)
		{
		
			
			((OnRtnRepealFromBankToFutureByFutureType)_OnRtnRepealFromBankToFutureByFuture)(pRspRepeal);
			
		
		}
	}
virtual void OnRtnRepealFromFutureToBankByFuture(CThostFtdcRspRepealField *pRspRepeal)
	{
		if (_OnRtnRepealFromFutureToBankByFuture)
		{
		
			
			((OnRtnRepealFromFutureToBankByFutureType)_OnRtnRepealFromFutureToBankByFuture)(pRspRepeal);
			
		
		}
	}
virtual void OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspFromBankToFutureByFuture)
		{
		
			
			((OnRspFromBankToFutureByFutureType)_OnRspFromBankToFutureByFuture)(pReqTransfer,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspFromFutureToBankByFuture)
		{
		
			
			((OnRspFromFutureToBankByFutureType)_OnRspFromFutureToBankByFuture)(pReqTransfer,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQueryBankAccountMoneyByFuture)
		{
		
			
			((OnRspQueryBankAccountMoneyByFutureType)_OnRspQueryBankAccountMoneyByFuture)(pReqQueryAccount,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRtnOpenAccountByBank(CThostFtdcOpenAccountField *pOpenAccount)
	{
		if (_OnRtnOpenAccountByBank)
		{
		
			
			((OnRtnOpenAccountByBankType)_OnRtnOpenAccountByBank)(pOpenAccount);
			
		
		}
	}
virtual void OnRtnCancelAccountByBank(CThostFtdcCancelAccountField *pCancelAccount)
	{
		if (_OnRtnCancelAccountByBank)
		{
		
			
			((OnRtnCancelAccountByBankType)_OnRtnCancelAccountByBank)(pCancelAccount);
			
		
		}
	}
virtual void OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount)
	{
		if (_OnRtnChangeAccountByBank)
		{
		
			
			((OnRtnChangeAccountByBankType)_OnRtnChangeAccountByBank)(pChangeAccount);
			
		
		}
	}
virtual void OnRtnResOpenAccConfirmTpdByBank(CThostFtdcResOpenAccConfirmTpdField *pResOpenAccConfirmTpd)
	{
		if (_OnRtnResOpenAccConfirmTpdByBank)
		{
		
			
			((OnRtnResOpenAccConfirmTpdByBankType)_OnRtnResOpenAccConfirmTpdByBank)(pResOpenAccConfirmTpd);
			
		
		}
	}
virtual void OnRspReserveOpenAccountTpdByFuture(CThostFtdcReqReserveOpenAccountTpdField *pReqReserveOpenAccountTpd, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspReserveOpenAccountTpdByFuture)
		{
		
			
			((OnRspReserveOpenAccountTpdByFutureType)_OnRspReserveOpenAccountTpdByFuture)(pReqReserveOpenAccountTpd,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspSecuritiesDepositInterestByFuture(CThostFtdcReqSecuritiesDepositInterestField *pReqSecuritiesDepositInterest, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspSecuritiesDepositInterestByFuture)
		{
		
			
			((OnRspSecuritiesDepositInterestByFutureType)_OnRspSecuritiesDepositInterestByFuture)(pReqSecuritiesDepositInterest,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspDayEndFileReadyByFuture(CThostFtdcReqDayEndFileReadyField *pReqDayEndFileReady, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspDayEndFileReadyByFuture)
		{
		
			
			((OnRspDayEndFileReadyByFutureType)_OnRspDayEndFileReadyByFuture)(pReqDayEndFileReady,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspExecCombineOrderInsert(CThostFtdcInputExecCombineOrderField *pInputExecCombineOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspExecCombineOrderInsert)
		{
		
			
			((OnRspExecCombineOrderInsertType)_OnRspExecCombineOrderInsert)(pInputExecCombineOrder,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspExecCombineOrderAction(CThostFtdcInputExecCombineOrderActionField *pInputExecCombineOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspExecCombineOrderAction)
		{
		
			
			((OnRspExecCombineOrderActionType)_OnRspExecCombineOrderAction)(pInputExecCombineOrderAction,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryExecCombineOrder(CThostFtdcExecCombineOrderField *pExecCombineOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryExecCombineOrder)
		{
		
			
			((OnRspQryExecCombineOrderType)_OnRspQryExecCombineOrder)(pExecCombineOrder,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnErrRtnExecCombineOrderAction(CThostFtdcExecCombineOrderActionField *pExecCombineOrderAction, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnExecCombineOrderAction)
		{
		
			
			((OnErrRtnExecCombineOrderActionType)_OnErrRtnExecCombineOrderAction)(pExecCombineOrderAction,pRspInfo);
			
		
		}
	}
virtual void OnErrRtnExecCombineOrderInsert(CThostFtdcInputExecCombineOrderField *pInputExecCombineOrder, CThostFtdcRspInfoField *pRspInfo)
	{
		if (_OnErrRtnExecCombineOrderInsert)
		{
		
			
			((OnErrRtnExecCombineOrderInsertType)_OnErrRtnExecCombineOrderInsert)(pInputExecCombineOrder,pRspInfo);
			
		
		}
	}
virtual void OnRtnExecCombineOrder(CThostFtdcExecCombineOrderField *pExecCombineOrder)
	{
		if (_OnRtnExecCombineOrder)
		{
		
			
			((OnRtnExecCombineOrderType)_OnRtnExecCombineOrder)(pExecCombineOrder);
			
		
		}
	}
virtual void OnRspInternalTransfer(CThostFtdcInputInternalTransferField *pInputInternalTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspInternalTransfer)
		{
		
			
			((OnRspInternalTransferType)_OnRspInternalTransfer)(pInputInternalTransfer,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRtnInternalTransfer(CThostFtdcRtnInternalTransferField *pRtnInternalTransfer)
	{
		if (_OnRtnInternalTransfer)
		{
		
			
			((OnRtnInternalTransferType)_OnRtnInternalTransfer)(pRtnInternalTransfer);
			
		
		}
	}
virtual void OnRspQryInternalTransfer(CThostFtdcInternalTransferField *pInternalTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryInternalTransfer)
		{
		
			
			((OnRspQryInternalTransferType)_OnRspQryInternalTransfer)(pInternalTransfer,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}
virtual void OnRspQryFutureTradingAccount(CThostFtdcNtfQryFutureTradingAccountField *pNtfQryFutureTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
	{
		if (_OnRspQryFutureTradingAccount)
		{
		
			
			((OnRspQryFutureTradingAccountType)_OnRspQryFutureTradingAccount)(pNtfQryFutureTradingAccount,pRspInfo,nRequestID,bIsLast);
			
		
		}
	}

};
